issueGiftCard
HTTP method: POST
Use the issueGiftCard method to issue a digital gift card.
Test URL | https://testgateway.altapaysecure.com/processor/API/<method> |
Production URL | https://<YourShopName>.altapaysecure.com/processor/API/<method> |
Parameter | Description | Type | Mandatory | Notes |
---|---|---|---|---|
payment_request_id |
The id of the payment request. |
string | X | |
giftcard[account_identifier] |
The card number of the gift card. |
string | ||
giftcard[token] |
If you have a gift card token from a previous payment, it can be used instead of the account identifier and provider parameters. You can only use a token if the terminal has the specific gift card provider enabled. |
string | ||
giftcard[provider] |
The gift card provider that this gift card is for. The supported values are: |
string | ||
giftcard[account_authenticator] |
The giftcard[account_authenticator] is the PIN code or password for the gift card. This is not required when the giftcard[provider] parameter is set to test. |
string |
The table shows the most pertinent response values for the method. For a complete list of API response parameters, see API Response structure (XML).
Parameter |
Description |
Type |
---|---|---|
Result | Success or Fail. | string |
AccountIdentifier | The gift card number | string |
AccountAuthenticator | The PIN code or password for the gift card. | string |
Request
curl --request POST \ --url https://<YourShopName>.altapaysecure.com/processor/API/issueGiftCard \ --header 'Authorization: Basic auth' \ --data payment_request_id=9fb5e6a5-d847-4dde-9694-de4b42989c90 \
XML response
<?xml version="1.0" encoding="UTF-8"?> <APIResponse version="20170228"> <Header> <Date>2020-07-20T09:02:45+02:00</Date> <Path>API/issueGiftCard</Path> <ErrorCode>0</ErrorCode> <ErrorMessage /> </Header> <Body> <Result>Success</Result> <GiftCard> <AccountIdentifier>3831442224407000</AccountIdentifier> <AccountAuthenticator>111</AccountAuthenticator> </GiftCard> <Transactions> <Transaction> <TransactionId>15</TransactionId> <PaymentId>9fb5e6a5-d847-4dde-9694-de4b42989c90</PaymentId> <AuthType>payment</AuthType> <CardStatus>NoCreditCard</CardStatus> <CreditCardToken /> <CreditCardMaskedPan /> <GiftCardToken>c8bb86fd1ce61b908ade50c8ac42caaac975c873</GiftCardToken> <MaskedGiftCard>383144******7000</MaskedGiftCard> <ThreeDSecureResult>Not_Applicable</ThreeDSecureResult> <LiableForChargeback>Merchant</LiableForChargeback> <CVVCheckResult>Not_Applicable</CVVCheckResult> <BlacklistToken /> <ShopOrderId>asb123</ShopOrderId> <Shop>AltaPay Shop</Shop> <Terminal>AltaPay Test Terminal</Terminal> <TransactionStatus>credited</TransactionStatus> <ReasonCode>NONE</ReasonCode> <MerchantCurrency>978</MerchantCurrency> <MerchantCurrencyAlpha>EUR</MerchantCurrencyAlpha> <CardHolderCurrency>978</CardHolderCurrency> <CardHolderCurrencyAlpha>EUR</CardHolderCurrencyAlpha> <ReservedAmount>0.00</ReservedAmount> <CapturedAmount>0.00</CapturedAmount> <RefundedAmount>0.00</RefundedAmount> <CreditedAmount>12.00</CreditedAmount> <RecurringDefaultAmount>0.00</RecurringDefaultAmount> <SurchargeAmount>0.00</SurchargeAmount> <CreatedDate>2016-07-20 09:02:43</CreatedDate> <UpdatedDate>2016-07-20 09:02:44</UpdatedDate> <PaymentNature>GiftCard</PaymentNature> <PaymentSchemeName>Test giftcard</PaymentSchemeName> <PaymentNatureService name="TestGiftCardAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease> <SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>true</SupportsMultipleRefunds> </PaymentNatureService> </Transaction> </Transactions> </Body> </APIResponse>